<style>
#artikliBrowse{
	width:900px;
}
#artikliBrowse .info{
	color:#aaa;
	font-size:11px;
	margin:40px 0px 0px 100px;
	float:left;
}
#artikliBrowse #artikliResult{
	width:500px;
	margin-top:2px;
	clear:both;
}
#artikliBrowse #artikliResult table{
	margin-top:5px;
}
#artikliBrowse #artikliResult table tr td{
	vertical-align:top;
}
#artikliBrowse #artikliResult table tr:hover{
	background:{{$highlight}};
	color:{{$highlighttext}};
}
#artikliBrowse #artikliResult table tr td input[type=button]{
	width:16px;
	height:16px;
	padding:0px;
	margin:0px 1px;
	background-color:transparent;
	border:none;
	cursor:pointer;
	float:none;
}
#artikliBrowse #artikliResult table tr td input[type=button]:hover{
	background-color:#fff;
}
#artikliBrowse #editArtiklTemplate{
	width:260px;
	margin:2px 0px 0px 2px;
	display:none;
}
#artikliBrowse #editArtiklTemplate a.close{
	float:right;
	border:1px solid transparent;
}
#artikliBrowse #editArtiklTemplate a.close:hover{
	border:1px solid #000;
}

#artikliBrowse #editArtiklTemplate a.close img{border:none}
#artikliBrowse #editArtiklTemplate label{
	width:40px;
}
#artikliBrowse #editArtiklTemplate textarea,
#artikliBrowse #editArtiklTemplate input[type=text]{width:200px;}
#artikliBrowse #editArtiklTemplate input[type=reset],
#artikliBrowse #editArtiklTemplate input[type=submit]{
	float:right;
}
</style>
<div id="artikliBrowse">
	<h2>Artikli</h2>
	<form class="area" method="post" action="javascript:void(0)" onsubmit="submitForm(this,'artikli.php','POST','setContent',1)">
		<input type="hidden" name="a" value="artikli" />
		
		<label class="left" for="filter_artname">Naziv:</label>
		<input type="text" name="filter_artname" id="filter_artname" value="{{$filter_artname}}" />
		
		<label class="left" for="filter_artgroup">Grupa:</label>
		<select name="filter_artgroup" id="filter_artgroup">
			<option value="-1">---</option>
			{{%loop start artgroup_id}}
			<option value="{{$artgroup_id}}" {{$artgroup_selected}}>{{$artgroup_name}}</option>
			{{%loop end}}
		</select>
		
		<input type="submit" value="filter" />
	</form><span class="info">{{$info}}</span>
	<div class="area" id="artikliResult">
		<input type="button" class="novi" value="novi artikl" style="float:right; margin:0px;" onclick="editArtikl(this,1)" />
		{{$comment_start}}
		<ul class="letter_filter">
			<li>Strana:</li>
			{{%loop start page}}
			<li><a href="javascript:void(0)" onclick="LoadRSDoc('artikli.php?a=artikli&page={{$page}}&filter_artname={{$filter_artname}}&filter_artgroup={{$filter_artgroup}}','setContent')" id="{{$current_page}}">{{$page}}</a></li>
			{{%loop end}}
		</ul>
		<br clear="all" />
		<table width="100%">
			<tr class="head" align="center">
				<td width="5%">šifra</td>
				<td width="40%">naziv</td>
				<td width="10%">grupa</td>
				<td>opis</td>
				<td width="40"></td>
			</tr>
			{{%loop start art_id}}
			<tr>
				<td align="right">{{$art_id}}</td>
				<td>{{$art_name}}</td>
				<td group="{{$art_group_id}}">{{$art_group}}</td>
				<td>{{$art_desc}}</td>
				<td align="center;">
					<input title="izmeni" type="button" class="edit" onclick="editArtikl(this)" />
					<input title="obriši" type="button" class="delete" onclick="if(confirm('Da li želite da obrišete artikl \'{{$art_name}}\'?')){LoadRSDoc('artikli.php?a=artikli&mod=delete&id={{$art_id}}','afterSaveArtikl')}" />
				</td>
			</tr>
			{{%loop end}}
		</table>
		{{$comment_end}}
	</div>
	<form id="editArtiklTemplate" class="area" action="javascript:void(0)" onsubmit="submitForm(this,'artikli.php','POST','afterSaveArtikl',1)">
		<a title="close" class="close" href="javascript:void(0)" onclick="this.parentNode.style.display='none'"><img src="gui/close_12.gif" /></a>
		<h3>Izmena artikla #<span id="edit_sifra_art"></span></h3>
		
		<input type="hidden" name="edit_art_id" id="edit_art_id" value="" />
		<input type="hidden" name="a" value="artikli" />
		<input type="hidden" name="mod" value="save" />
		
		<label class="left" for="edit_art_name">Naziv:</label>
		<input type="text" name="edit_art_name" id="edit_art_name" value="" />
		<br clear="all" />
		<label class="left" for="edit_art_group">Grupa:</label>
		<select name="edit_art_group" id="edit_art_group">
			{{%loop start artgroup_id}}
			<option value="{{$artgroup_id}}">{{$artgroup_name}}</option>
			{{%loop end}}
		</select>
		<br clear="all" />
		<label class="left" for="edit_art_desc">Opis:</label>
		<textarea name="edit_art_desc" id="edit_art_desc"></textarea>
		<br clear="all" />
		<input type="submit" class="save" value="sačuvaj" />
	</form>
</div>